<?php

class Admin_Form_OrganSearch extends Zend_Dojo_Form
{
    public function init()
    {    	
        $this->setName("OrganSearch");
        $this->setMethod('post');
        $this->addAttribs(array('onSubmit'=>'return validate(this)'));
        
		$this->addElement('TextBox', 'name',array(
	        'label'          => 'Nome: ',
         	'focus'          => true,
	        'invalidMessage' => 'Nome inválido',
        	'style'      	 => 'width: 400px;',
		));

		$this->addElement('TextBox', 'acronym',array(
	        'label'          => 'Sigla: ',
         	'focus'          => true,
			'maxlength'		 => 20,
	        'regExp'         => '[\w]+',
	        'invalidMessage' => 'Sigla inválida',
        	'style'      	 => 'width: 250px;',
		));

        $this->addElement('SubmitButton', 'button', array(
            'label'    => 'Pesquisar',
	        'required' => false,
	        'ignore' => true,
        ));    
        
        $this->addDisplayGroup(array('name','acronym','button'), 'search', array('legend'=>"Pesquisar")); 

    }
}

